The present invention relates to an audio coder using entropy coding, i.e., Huffman coding capable of reduction of the amount of calculations in the encoders.
FIG. 2 shows a conventional audio coder having a Huffman coding. In the coding operation, a quantization step width predictor 4 first predicts a quantization step width from input data, and according to this quantization step width a quantizer 1 performs a quantization process. Based on the quantization data calculated in the quantizer 1, a Huffman table is selected, and Huffman coding is performed according to the selected table data in a Huffman coder 2. Then, the number of bits per unit time, for example per second, of the data obtained as a result of the Huffman coding are counted for comparison with a predetermined value B of the bit rate information which is the number of bits per unit time, for example, per second. If the counted bit number is not in excess of the predetermined value B, a process for one frame is completed. If the counted bit number (amount of codes generated) from the Huffman coder 2 is in excess of the predetermined value, the quantization is performed in the quantizer 1 with the quantization step width increased by one step. The above series of counted processes are repeatedly executed until the counted bit number is less than the predetermined value B.
In Japanese Patent Laid-Open Publication No. Hei 3-171828, there is disclosed a reduction technique of the amount of the calculations by using vector quantization. In this technique, provided is a codebook comprising codevectors classified into groups according to the property of the input data. The property of the input data is judged by the property judging means. The codevector in groups corresponding to the judged result is retrieved. According to this technique, the number of vectors to be retrieved is decreased and the amount of calculations required for the optimum vector determination.
In the above method, the calculation amount may be reduced when the series of processes of the quantization, Huffman coding and bit number calculation are completed in one time, or the number of the repeated calculations is small. However, if the step width of the first quantization is greatly different from the appropriate one for the bit rate information, it is necessary to repeat the processes of the quantization, Huffman coding and bit number calculation for a considerable number of times, whereby the amount of calculations is increased.